<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        <form method="post" action="/cha">
            <table>
                <tr>
                    <td >
                        <select name="hospitalId">
                            <option th:value ="0">请选择</option>
                            <option th:each="hosp:${medical2}"
                                    th:value="${hosp.getId()}"
                                    th:text="${hosp.getName()}">
                            </option>
                        </select>
                    </td>

                    <td>
                        <input type="submit" value="查找">
                    </td>

                    <td>

                        当前查询检测机构为：
                        <span  th:if="${hospitalId==0}">无</span>
                        <span  th:if="${hospitalId==1}">北京生物</span>
                        <span  th:if="${hospitalId==2}">武汉生物</span>
                        <span  th:if="${hospitalId==3}">求索路诊所</span>
                        <span  th:if="${hospitalId==4}">千亩湖诊所</span>
                        <span  th:if="${hospitalId==5}">湘雅医院</span>
                        <span  th:if="${hospitalId==6}">市儿童医院</span>
                    </td>

                    <td>
                        <p>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/add">新增</a>
                        </p>
                    </td>
                </tr>
            </table>

        </form>

        <table>
            <tr>
                <td>
                    被检查人
                </td>
                <td>
                    被检查人手机号
                </td>
                <td>
                    被检查人身份证号
                </td>
                <td>
                    检测机构
                </td>
                <td>
                    检测日期
                </td>
                <td>
                    检测结果
                </td>
                <td>
                    操作
                </td>
            </tr>
            <tr th:each="medical:${medical}">
                <td>
                    <span th:text="${medical.getAssayuser()}"></span>
                </td>
                <td>
                    <span th:text="${medical.getPhone()}"></span>
                </td>
                <td>
                    <span th:text="${medical.getCardnum()}"></span>
                </td>
                <td>
                    <span  th:if="${medical.getHospitalId()==1}">北京生物</span>
                    <span  th:if="${medical.getHospitalId()==2}">武汉生物</span>
                    <span  th:if="${medical.getHospitalId()==3}">求索路诊所</span>
                    <span  th:if="${medical.getHospitalId()==4}">千亩湖诊所</span>
                    <span  th:if="${medical.getHospitalId()==5}">湘雅医院</span>
                    <span  th:if="${medical.getHospitalId()==6}">市儿童医院</span>
                </td>
                <td>
                    <span th:text="${medical.getAssaytime()}"></span>
                </td>
                <td>
                    <span  th:if="${medical.getAssayresult()==0}">检测中</span>
                    <span  th:if="${medical.getAssayresult()==1}">确诊</span>
                </td>
                <td>
<!--                    <span th:text="${medical.getAssayuser()}"></span>-->
                    <a th:href="@{/que(id=${medical.getId})}">确诊</a>
                </td>
            </tr>
        </table>
    </div>
</body>
</html>